home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++ / leda / 50 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.6 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.smalltalk,comp.lang.perl.misc,comp.lang.pascal.borland,comp.lang.eiffel,comp.lang.cobol,comp.lang.c++.leda,comp.lang.c,comp.lang.basic.visual.3rdparty,alt.computer.workshop.live,alt.comp.hardware.homebuilt,alt.clearing.technology,alt.chinese.computing,news.newusers.questions
  4. Subject: Re: PROGRAMERS OF ANY LANGUAGE
  5. Date: 10 Apr 1996 12:51:22 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4kh3fqINNmuv@keats.ugrad.cs.ubc.ca>
  8. References: <Pine.SOL.3.91.960329010021.13209A-100000@harvey> <316A6189.4287@wight.hursley.ibm.com> <4kebqq$4qs@Starbase.NeoSoft.COM> <316B7C8C.794B@wight.hursley.ibm.com>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <316B7C8C.794B@wight.hursley.ibm.com>,
  12. Max Waterman  <max-lton@tcp.co.uk> wrote:
  13.  >Will Morse wrote:
  14.  >> 
  15.  >> In article <316A6189.4287@wight.hursley.ibm.com>,
  16.  >> Max Waterman  <max@lton.u-net.com> wrote:
  17.  >> >Javier Kohen wrote:
  18.  >> >>
  19.  >> >> Drew <aellis@harvey> wrote:
  20.  >> >>
  21.  >> >> >       I am trying to document the pros and cons of the different
  22.  >> >> >languages.  Would you please e-mail me and tell me some of the things you
  23.  >> >> >like or dislike about them.
  24.  >> >>
  25.  >>                 [ snip ]
  26.  >> >> Why use begin/end instead of {/} ?
  27.  >> >
  28.  >> >Why use {/} ? Why not just get the compiler to recognise the indentation?
  29.  >> >Does anyone out there not indent and extra width for a block? It's rare to
  30.  >> >get the indentation wrong but it's common to forget to put the {/}s in -
  31.  >> >especially when changing code.
  32.  >> >
  33.  >> >Any comments?
  34.  >> >
  35.  >> 
  36.  >> I like to use {/} because vi, among others, lets me find the matching
  37.  >> }/{ using the % key.
  38.  >
  39.  >I like to use these features of vi, too, and I suppose it's sort of an
  40.  >argument for using them, but I don't think an editor should dictate language
  41.  >features or coding style. I think I tend to agree with you. I use the vi
  42.  >features to check the matching curlies, and for navigation, but with
  43.  >sensitive indentation, I would not need to check them, but I would miss the
  44.  >ability to jump to the start/end of a block. I'm not sure on this one.
  45.  
  46. Those curlies appear in languages other than C, for which the syntax-directed
  47. indentation method would fail, but the simple { } matching still works. I make
  48. frequent use of it in TeX code, which would not benefit from a blind
  49. application of C-style indentation at all.
  50.  
  51. The matching is also helpful in typing ordinary english. Square brackets are
  52. often used in quotes to indicate editorial material, (and parentheses go
  53. without saying).
  54. -- 
  55.  
  56.